{% extends "admin/base.html" %}
{% load i18n %}

{% block title %}{% if title %}{{title|capfirst}} - {% endif %}{% setting 'BRANDING' %}{% endblock %}
{% block branding %}<img class="img-fluid" src="{{STATIC_URL}}img/frepple.svg" alt="frePPLe&nbsp;{% version %}">{% endblock %}
{% block extrastyle %}{{block.super}}
<link rel="stylesheet" href="{{STATIC_URL}}css/font-awesome.min.css" />
<link rel="stylesheet" href="{{STATIC_URL}}css/{{request.theme}}/fonts.css" />
<link rel="stylesheet" href="{{STATIC_URL}}css/ui.jqgrid.min.css" />
<link rel="stylesheet" href="{{STATIC_URL}}css/{{request.theme}}/bootstrap.min.css" />

<link rel="shortcut icon" href="{{STATIC_URL}}favicon.ico"/>
<link rel="manifest" href="{{STATIC_URL}}manifest.json">
{% endblock %}
{% block extrahead %}{{block.super}}
<script src="/data/jsi18n/"></script>
<script src="{{STATIC_URL}}js/jquery-3.6.0.min.js"></script>
<script src="{{STATIC_URL}}js/jquery-ui.min.js"></script>
<script src="{{STATIC_URL}}js/moment-with-locales.min.js"></script>
<script src="{{STATIC_URL}}js/typeahead.bundle.min.js"></script>
<script src="{{STATIC_URL}}js/i18n/grid.locale-{{LANGUAGE_CODE|default:"en"}}.js"></script>
<script src="{{STATIC_URL}}js/jquery.jqgrid.min.js"></script>
<script src="{{STATIC_URL}}js/frepple{% if not debug_js %}.min{% endif %}.js"></script>

<script src="{{STATIC_URL}}js/Sortable.min.js"></script>
<script>
  var url_prefix = '{{request.prefix}}';
  var database = '{{request.database}}';
  var documentation = '{% setting "DOCUMENTATION_URL" %}/docs/{% version_short %}/';
  var dateformat = '{% setting "DATE_FORMAT_JS" %}';
  var datetimeformat = '{% setting "DATETIME_FORMAT_JS" %}';

  if (navigator && 'serviceWorker' in navigator)
    navigator.serviceWorker.register("{{STATIC_URL}}js/serviceworker.js");

$(function() {
    {% if tzoffset is None %}
    setCookie('tzoffset', new Date().getTimezoneOffset() * 60);
    {% endif %}
  });
</script>
{% endblock %}
{% block nav-global %}{% endblock %}
